using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VAKMASH
    {
        public DataRow Convert2AKMASH(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryAKMASH(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["AKMMANDANT"] = " ".PadRight(2 ); 
         dwReturn["AKMPKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["AKMPKST"] = " ".PadRight(4 ); 
         dwReturn["AKMNRKRS"] = " ".PadRight(2 ); 
         dwReturn["AKMLFDNR"] = " ".PadRight(4 ); 
         dwReturn["AKMPOS"] = " ".PadRight(2 ); 
         dwReturn["AKMPERSNR"] = " ".PadRight(8 ); 
         dwReturn["AKMJJJJ"] = " ".PadRight(4 ); 
         dwReturn["AKMMM"] = " ".PadRight(2 ); 
         dwReturn["AKMAENZL"] = " ".PadRight(0 ); 
         dwReturn["AKMAENB"] = " ".PadRight(8 ); 
         dwReturn["AKMAEND"] = " ".PadRight(0 ); 
         dwReturn["AKMNEUB"] = " ".PadRight(8 ); 
         dwReturn["AKMNEUD"] = " ".PadRight(0 ); 
         dwReturn["AKMSYS1"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB1"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT1"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER11"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS2"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB2"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT2"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER12"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS3"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB3"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT3"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER13"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS4"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB4"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT4"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER14"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS5"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB5"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT5"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER15"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS6"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB6"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT6"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER16"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS7"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB7"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT7"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER17"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS8"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB8"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT8"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER18"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS9"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB9"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT9"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER19"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS10"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB10"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT10"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER110"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS11"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB11"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT11"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER111"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS12"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB12"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT12"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER112"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS13"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB13"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT13"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER113"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS14"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB14"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT14"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER114"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS15"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB15"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT15"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER115"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS16"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB16"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT16"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER116"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS17"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB17"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT17"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER117"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS18"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB18"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT18"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER118"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS19"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB19"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT19"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER119"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS20"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB20"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT20"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER120"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS21"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB21"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT21"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER121"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS22"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB22"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT22"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER122"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS23"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB23"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT23"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER123"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS24"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB24"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT24"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER124"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS25"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB25"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT25"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER125"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS26"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB26"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT26"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER126"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS27"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB27"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT27"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER127"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS28"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB28"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT28"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER128"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS29"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB29"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT29"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER129"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS30"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB30"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT30"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER130"] = " ".PadRight(6 ); 
         dwReturn["AKMSYS31"] = " ".PadRight(2 ); 
         dwReturn["AKMURLAB31"] = " ".PadRight(0 ); 
         dwReturn["AKMURLZT31"] = " ".PadRight(0 ); 
         dwReturn["AKMFILLER131"] = " ".PadRight(6 ); 
         dwReturn["AKMSYSKEY"] = " ".PadRight(2 ); 
         dwReturn["AKMFILLER2"] = " ".PadRight(46 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapAKMASH(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveAKMASH(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryAKMASH(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapAKMASH(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertAKMASH(dwLocal, ITXDBVERSION);
            }
            UpdateAKMASH(dwLocal);
        }
        public void InsertAKMASH(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO AKMASH(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryAKMASH(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM AKMASH WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM AKMASH  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "AKMASH";
            Return = Result;
            return Return;
        }
        public void DeleteAKMASH(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM AKMASH   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateAKMASH(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE AKMASH SET "
                    +"AKMMANDANT= :AKMMANDANT,"
                    +"AKMPKSTKRS= :AKMPKSTKRS,"
                    +"AKMPKST= :AKMPKST,"
                    +"AKMNRKRS= :AKMNRKRS,"
                    +"AKMLFDNR= :AKMLFDNR,"
                    +"AKMPOS= :AKMPOS,"
                    +"AKMPERSNR= :AKMPERSNR,"
                    +"AKMJJJJ= :AKMJJJJ,"
                    +"AKMMM= :AKMMM,"
                    +"AKMAENZL= :AKMAENZL,"
                    +"AKMAENB= :AKMAENB,"
                    +"AKMAEND= :AKMAEND,"
                    +"AKMNEUB= :AKMNEUB,"
                    +"AKMNEUD= :AKMNEUD,"
                    +"AKMSYS1= :AKMSYS1,"
                    +"AKMURLAB1= :AKMURLAB1,"
                    +"AKMURLZT1= :AKMURLZT1,"
                    +"AKMFILLER11= :AKMFILLER11,"
                    +"AKMSYS2= :AKMSYS2,"
                    +"AKMURLAB2= :AKMURLAB2,"
                    +"AKMURLZT2= :AKMURLZT2,"
                    +"AKMFILLER12= :AKMFILLER12,"
                    +"AKMSYS3= :AKMSYS3,"
                    +"AKMURLAB3= :AKMURLAB3,"
                    +"AKMURLZT3= :AKMURLZT3,"
                    +"AKMFILLER13= :AKMFILLER13,"
                    +"AKMSYS4= :AKMSYS4,"
                    +"AKMURLAB4= :AKMURLAB4,"
                    +"AKMURLZT4= :AKMURLZT4,"
                    +"AKMFILLER14= :AKMFILLER14,"
                    +"AKMSYS5= :AKMSYS5,"
                    +"AKMURLAB5= :AKMURLAB5,"
                    +"AKMURLZT5= :AKMURLZT5,"
                    +"AKMFILLER15= :AKMFILLER15,"
                    +"AKMSYS6= :AKMSYS6,"
                    +"AKMURLAB6= :AKMURLAB6,"
                    +"AKMURLZT6= :AKMURLZT6,"
                    +"AKMFILLER16= :AKMFILLER16,"
                    +"AKMSYS7= :AKMSYS7,"
                    +"AKMURLAB7= :AKMURLAB7,"
                    +"AKMURLZT7= :AKMURLZT7,"
                    +"AKMFILLER17= :AKMFILLER17,"
                    +"AKMSYS8= :AKMSYS8,"
                    +"AKMURLAB8= :AKMURLAB8,"
                    +"AKMURLZT8= :AKMURLZT8,"
                    +"AKMFILLER18= :AKMFILLER18,"
                    +"AKMSYS9= :AKMSYS9,"
                    +"AKMURLAB9= :AKMURLAB9,"
                    +"AKMURLZT9= :AKMURLZT9,"
                    +"AKMFILLER19= :AKMFILLER19,"
                    +"AKMSYS10= :AKMSYS10,"
                    +"AKMURLAB10= :AKMURLAB10,"
                    +"AKMURLZT10= :AKMURLZT10,"
                    +"AKMFILLER110= :AKMFILLER110,"
                    +"AKMSYS11= :AKMSYS11,"
                    +"AKMURLAB11= :AKMURLAB11,"
                    +"AKMURLZT11= :AKMURLZT11,"
                    +"AKMFILLER111= :AKMFILLER111,"
                    +"AKMSYS12= :AKMSYS12,"
                    +"AKMURLAB12= :AKMURLAB12,"
                    +"AKMURLZT12= :AKMURLZT12,"
                    +"AKMFILLER112= :AKMFILLER112,"
                    +"AKMSYS13= :AKMSYS13,"
                    +"AKMURLAB13= :AKMURLAB13,"
                    +"AKMURLZT13= :AKMURLZT13,"
                    +"AKMFILLER113= :AKMFILLER113,"
                    +"AKMSYS14= :AKMSYS14,"
                    +"AKMURLAB14= :AKMURLAB14,"
                    +"AKMURLZT14= :AKMURLZT14,"
                    +"AKMFILLER114= :AKMFILLER114,"
                    +"AKMSYS15= :AKMSYS15,"
                    +"AKMURLAB15= :AKMURLAB15,"
                    +"AKMURLZT15= :AKMURLZT15,"
                    +"AKMFILLER115= :AKMFILLER115,"
                    +"AKMSYS16= :AKMSYS16,"
                    +"AKMURLAB16= :AKMURLAB16,"
                    +"AKMURLZT16= :AKMURLZT16,"
                    +"AKMFILLER116= :AKMFILLER116,"
                    +"AKMSYS17= :AKMSYS17,"
                    +"AKMURLAB17= :AKMURLAB17,"
                    +"AKMURLZT17= :AKMURLZT17,"
                    +"AKMFILLER117= :AKMFILLER117,"
                    +"AKMSYS18= :AKMSYS18,"
                    +"AKMURLAB18= :AKMURLAB18,"
                    +"AKMURLZT18= :AKMURLZT18,"
                    +"AKMFILLER118= :AKMFILLER118,"
                    +"AKMSYS19= :AKMSYS19,"
                    +"AKMURLAB19= :AKMURLAB19,"
                    +"AKMURLZT19= :AKMURLZT19,"
                    +"AKMFILLER119= :AKMFILLER119,"
                    +"AKMSYS20= :AKMSYS20,"
                    +"AKMURLAB20= :AKMURLAB20,"
                    +"AKMURLZT20= :AKMURLZT20,"
                    +"AKMFILLER120= :AKMFILLER120,"
                    +"AKMSYS21= :AKMSYS21,"
                    +"AKMURLAB21= :AKMURLAB21,"
                    +"AKMURLZT21= :AKMURLZT21,"
                    +"AKMFILLER121= :AKMFILLER121,"
                    +"AKMSYS22= :AKMSYS22,"
                    +"AKMURLAB22= :AKMURLAB22,"
                    +"AKMURLZT22= :AKMURLZT22,"
                    +"AKMFILLER122= :AKMFILLER122,"
                    +"AKMSYS23= :AKMSYS23,"
                    +"AKMURLAB23= :AKMURLAB23,"
                    +"AKMURLZT23= :AKMURLZT23,"
                    +"AKMFILLER123= :AKMFILLER123,"
                    +"AKMSYS24= :AKMSYS24,"
                    +"AKMURLAB24= :AKMURLAB24,"
                    +"AKMURLZT24= :AKMURLZT24,"
                    +"AKMFILLER124= :AKMFILLER124,"
                    +"AKMSYS25= :AKMSYS25,"
                    +"AKMURLAB25= :AKMURLAB25,"
                    +"AKMURLZT25= :AKMURLZT25,"
                    +"AKMFILLER125= :AKMFILLER125,"
                    +"AKMSYS26= :AKMSYS26,"
                    +"AKMURLAB26= :AKMURLAB26,"
                    +"AKMURLZT26= :AKMURLZT26,"
                    +"AKMFILLER126= :AKMFILLER126,"
                    +"AKMSYS27= :AKMSYS27,"
                    +"AKMURLAB27= :AKMURLAB27,"
                    +"AKMURLZT27= :AKMURLZT27,"
                    +"AKMFILLER127= :AKMFILLER127,"
                    +"AKMSYS28= :AKMSYS28,"
                    +"AKMURLAB28= :AKMURLAB28,"
                    +"AKMURLZT28= :AKMURLZT28,"
                    +"AKMFILLER128= :AKMFILLER128,"
                    +"AKMSYS29= :AKMSYS29,"
                    +"AKMURLAB29= :AKMURLAB29,"
                    +"AKMURLZT29= :AKMURLZT29,"
                    +"AKMFILLER129= :AKMFILLER129,"
                    +"AKMSYS30= :AKMSYS30,"
                    +"AKMURLAB30= :AKMURLAB30,"
                    +"AKMURLZT30= :AKMURLZT30,"
                    +"AKMFILLER130= :AKMFILLER130,"
                    +"AKMSYS31= :AKMSYS31,"
                    +"AKMURLAB31= :AKMURLAB31,"
                    +"AKMURLZT31= :AKMURLZT31,"
                    +"AKMFILLER131= :AKMFILLER131,"
                    +"AKMSYSKEY= :AKMSYSKEY,"
                    +"AKMFILLER2= :AKMFILLER2,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("AKMMANDANT", OracleType.NVarChar).Value = dwData["AKMMANDANT"].ToString(); 
          or1.Parameters.Add("AKMPKSTKRS", OracleType.NVarChar).Value = dwData["AKMPKSTKRS"].ToString(); 
          or1.Parameters.Add("AKMPKST", OracleType.NVarChar).Value = dwData["AKMPKST"].ToString(); 
          or1.Parameters.Add("AKMNRKRS", OracleType.NVarChar).Value = dwData["AKMNRKRS"].ToString(); 
          or1.Parameters.Add("AKMLFDNR", OracleType.NVarChar).Value = dwData["AKMLFDNR"].ToString(); 
          or1.Parameters.Add("AKMPOS", OracleType.NVarChar).Value = dwData["AKMPOS"].ToString(); 
          or1.Parameters.Add("AKMPERSNR", OracleType.NVarChar).Value = dwData["AKMPERSNR"].ToString(); 
          or1.Parameters.Add("AKMJJJJ", OracleType.NVarChar).Value = dwData["AKMJJJJ"].ToString(); 
          or1.Parameters.Add("AKMMM", OracleType.NVarChar).Value = dwData["AKMMM"].ToString(); 
          or1.Parameters.Add("AKMAENZL", OracleType.NVarChar).Value = dwData["AKMAENZL"].ToString(); 
          or1.Parameters.Add("AKMAENB", OracleType.NVarChar).Value = dwData["AKMAENB"].ToString(); 
          or1.Parameters.Add("AKMAEND", OracleType.NVarChar).Value = dwData["AKMAEND"].ToString(); 
          or1.Parameters.Add("AKMNEUB", OracleType.NVarChar).Value = dwData["AKMNEUB"].ToString(); 
          or1.Parameters.Add("AKMNEUD", OracleType.NVarChar).Value = dwData["AKMNEUD"].ToString(); 
          or1.Parameters.Add("AKMSYS1", OracleType.NVarChar).Value = dwData["AKMSYS1"].ToString(); 
          or1.Parameters.Add("AKMURLAB1", OracleType.NVarChar).Value = dwData["AKMURLAB1"].ToString(); 
          or1.Parameters.Add("AKMURLZT1", OracleType.NVarChar).Value = dwData["AKMURLZT1"].ToString(); 
          or1.Parameters.Add("AKMFILLER11", OracleType.NVarChar).Value = dwData["AKMFILLER11"].ToString(); 
          or1.Parameters.Add("AKMSYS2", OracleType.NVarChar).Value = dwData["AKMSYS2"].ToString(); 
          or1.Parameters.Add("AKMURLAB2", OracleType.NVarChar).Value = dwData["AKMURLAB2"].ToString(); 
          or1.Parameters.Add("AKMURLZT2", OracleType.NVarChar).Value = dwData["AKMURLZT2"].ToString(); 
          or1.Parameters.Add("AKMFILLER12", OracleType.NVarChar).Value = dwData["AKMFILLER12"].ToString(); 
          or1.Parameters.Add("AKMSYS3", OracleType.NVarChar).Value = dwData["AKMSYS3"].ToString(); 
          or1.Parameters.Add("AKMURLAB3", OracleType.NVarChar).Value = dwData["AKMURLAB3"].ToString(); 
          or1.Parameters.Add("AKMURLZT3", OracleType.NVarChar).Value = dwData["AKMURLZT3"].ToString(); 
          or1.Parameters.Add("AKMFILLER13", OracleType.NVarChar).Value = dwData["AKMFILLER13"].ToString(); 
          or1.Parameters.Add("AKMSYS4", OracleType.NVarChar).Value = dwData["AKMSYS4"].ToString(); 
          or1.Parameters.Add("AKMURLAB4", OracleType.NVarChar).Value = dwData["AKMURLAB4"].ToString(); 
          or1.Parameters.Add("AKMURLZT4", OracleType.NVarChar).Value = dwData["AKMURLZT4"].ToString(); 
          or1.Parameters.Add("AKMFILLER14", OracleType.NVarChar).Value = dwData["AKMFILLER14"].ToString(); 
          or1.Parameters.Add("AKMSYS5", OracleType.NVarChar).Value = dwData["AKMSYS5"].ToString(); 
          or1.Parameters.Add("AKMURLAB5", OracleType.NVarChar).Value = dwData["AKMURLAB5"].ToString(); 
          or1.Parameters.Add("AKMURLZT5", OracleType.NVarChar).Value = dwData["AKMURLZT5"].ToString(); 
          or1.Parameters.Add("AKMFILLER15", OracleType.NVarChar).Value = dwData["AKMFILLER15"].ToString(); 
          or1.Parameters.Add("AKMSYS6", OracleType.NVarChar).Value = dwData["AKMSYS6"].ToString(); 
          or1.Parameters.Add("AKMURLAB6", OracleType.NVarChar).Value = dwData["AKMURLAB6"].ToString(); 
          or1.Parameters.Add("AKMURLZT6", OracleType.NVarChar).Value = dwData["AKMURLZT6"].ToString(); 
          or1.Parameters.Add("AKMFILLER16", OracleType.NVarChar).Value = dwData["AKMFILLER16"].ToString(); 
          or1.Parameters.Add("AKMSYS7", OracleType.NVarChar).Value = dwData["AKMSYS7"].ToString(); 
          or1.Parameters.Add("AKMURLAB7", OracleType.NVarChar).Value = dwData["AKMURLAB7"].ToString(); 
          or1.Parameters.Add("AKMURLZT7", OracleType.NVarChar).Value = dwData["AKMURLZT7"].ToString(); 
          or1.Parameters.Add("AKMFILLER17", OracleType.NVarChar).Value = dwData["AKMFILLER17"].ToString(); 
          or1.Parameters.Add("AKMSYS8", OracleType.NVarChar).Value = dwData["AKMSYS8"].ToString(); 
          or1.Parameters.Add("AKMURLAB8", OracleType.NVarChar).Value = dwData["AKMURLAB8"].ToString(); 
          or1.Parameters.Add("AKMURLZT8", OracleType.NVarChar).Value = dwData["AKMURLZT8"].ToString(); 
          or1.Parameters.Add("AKMFILLER18", OracleType.NVarChar).Value = dwData["AKMFILLER18"].ToString(); 
          or1.Parameters.Add("AKMSYS9", OracleType.NVarChar).Value = dwData["AKMSYS9"].ToString(); 
          or1.Parameters.Add("AKMURLAB9", OracleType.NVarChar).Value = dwData["AKMURLAB9"].ToString(); 
          or1.Parameters.Add("AKMURLZT9", OracleType.NVarChar).Value = dwData["AKMURLZT9"].ToString(); 
          or1.Parameters.Add("AKMFILLER19", OracleType.NVarChar).Value = dwData["AKMFILLER19"].ToString(); 
          or1.Parameters.Add("AKMSYS10", OracleType.NVarChar).Value = dwData["AKMSYS10"].ToString(); 
          or1.Parameters.Add("AKMURLAB10", OracleType.NVarChar).Value = dwData["AKMURLAB10"].ToString(); 
          or1.Parameters.Add("AKMURLZT10", OracleType.NVarChar).Value = dwData["AKMURLZT10"].ToString(); 
          or1.Parameters.Add("AKMFILLER110", OracleType.NVarChar).Value = dwData["AKMFILLER110"].ToString(); 
          or1.Parameters.Add("AKMSYS11", OracleType.NVarChar).Value = dwData["AKMSYS11"].ToString(); 
          or1.Parameters.Add("AKMURLAB11", OracleType.NVarChar).Value = dwData["AKMURLAB11"].ToString(); 
          or1.Parameters.Add("AKMURLZT11", OracleType.NVarChar).Value = dwData["AKMURLZT11"].ToString(); 
          or1.Parameters.Add("AKMFILLER111", OracleType.NVarChar).Value = dwData["AKMFILLER111"].ToString(); 
          or1.Parameters.Add("AKMSYS12", OracleType.NVarChar).Value = dwData["AKMSYS12"].ToString(); 
          or1.Parameters.Add("AKMURLAB12", OracleType.NVarChar).Value = dwData["AKMURLAB12"].ToString(); 
          or1.Parameters.Add("AKMURLZT12", OracleType.NVarChar).Value = dwData["AKMURLZT12"].ToString(); 
          or1.Parameters.Add("AKMFILLER112", OracleType.NVarChar).Value = dwData["AKMFILLER112"].ToString(); 
          or1.Parameters.Add("AKMSYS13", OracleType.NVarChar).Value = dwData["AKMSYS13"].ToString(); 
          or1.Parameters.Add("AKMURLAB13", OracleType.NVarChar).Value = dwData["AKMURLAB13"].ToString(); 
          or1.Parameters.Add("AKMURLZT13", OracleType.NVarChar).Value = dwData["AKMURLZT13"].ToString(); 
          or1.Parameters.Add("AKMFILLER113", OracleType.NVarChar).Value = dwData["AKMFILLER113"].ToString(); 
          or1.Parameters.Add("AKMSYS14", OracleType.NVarChar).Value = dwData["AKMSYS14"].ToString(); 
          or1.Parameters.Add("AKMURLAB14", OracleType.NVarChar).Value = dwData["AKMURLAB14"].ToString(); 
          or1.Parameters.Add("AKMURLZT14", OracleType.NVarChar).Value = dwData["AKMURLZT14"].ToString(); 
          or1.Parameters.Add("AKMFILLER114", OracleType.NVarChar).Value = dwData["AKMFILLER114"].ToString(); 
          or1.Parameters.Add("AKMSYS15", OracleType.NVarChar).Value = dwData["AKMSYS15"].ToString(); 
          or1.Parameters.Add("AKMURLAB15", OracleType.NVarChar).Value = dwData["AKMURLAB15"].ToString(); 
          or1.Parameters.Add("AKMURLZT15", OracleType.NVarChar).Value = dwData["AKMURLZT15"].ToString(); 
          or1.Parameters.Add("AKMFILLER115", OracleType.NVarChar).Value = dwData["AKMFILLER115"].ToString(); 
          or1.Parameters.Add("AKMSYS16", OracleType.NVarChar).Value = dwData["AKMSYS16"].ToString(); 
          or1.Parameters.Add("AKMURLAB16", OracleType.NVarChar).Value = dwData["AKMURLAB16"].ToString(); 
          or1.Parameters.Add("AKMURLZT16", OracleType.NVarChar).Value = dwData["AKMURLZT16"].ToString(); 
          or1.Parameters.Add("AKMFILLER116", OracleType.NVarChar).Value = dwData["AKMFILLER116"].ToString(); 
          or1.Parameters.Add("AKMSYS17", OracleType.NVarChar).Value = dwData["AKMSYS17"].ToString(); 
          or1.Parameters.Add("AKMURLAB17", OracleType.NVarChar).Value = dwData["AKMURLAB17"].ToString(); 
          or1.Parameters.Add("AKMURLZT17", OracleType.NVarChar).Value = dwData["AKMURLZT17"].ToString(); 
          or1.Parameters.Add("AKMFILLER117", OracleType.NVarChar).Value = dwData["AKMFILLER117"].ToString(); 
          or1.Parameters.Add("AKMSYS18", OracleType.NVarChar).Value = dwData["AKMSYS18"].ToString(); 
          or1.Parameters.Add("AKMURLAB18", OracleType.NVarChar).Value = dwData["AKMURLAB18"].ToString(); 
          or1.Parameters.Add("AKMURLZT18", OracleType.NVarChar).Value = dwData["AKMURLZT18"].ToString(); 
          or1.Parameters.Add("AKMFILLER118", OracleType.NVarChar).Value = dwData["AKMFILLER118"].ToString(); 
          or1.Parameters.Add("AKMSYS19", OracleType.NVarChar).Value = dwData["AKMSYS19"].ToString(); 
          or1.Parameters.Add("AKMURLAB19", OracleType.NVarChar).Value = dwData["AKMURLAB19"].ToString(); 
          or1.Parameters.Add("AKMURLZT19", OracleType.NVarChar).Value = dwData["AKMURLZT19"].ToString(); 
          or1.Parameters.Add("AKMFILLER119", OracleType.NVarChar).Value = dwData["AKMFILLER119"].ToString(); 
          or1.Parameters.Add("AKMSYS20", OracleType.NVarChar).Value = dwData["AKMSYS20"].ToString(); 
          or1.Parameters.Add("AKMURLAB20", OracleType.NVarChar).Value = dwData["AKMURLAB20"].ToString(); 
          or1.Parameters.Add("AKMURLZT20", OracleType.NVarChar).Value = dwData["AKMURLZT20"].ToString(); 
          or1.Parameters.Add("AKMFILLER120", OracleType.NVarChar).Value = dwData["AKMFILLER120"].ToString(); 
          or1.Parameters.Add("AKMSYS21", OracleType.NVarChar).Value = dwData["AKMSYS21"].ToString(); 
          or1.Parameters.Add("AKMURLAB21", OracleType.NVarChar).Value = dwData["AKMURLAB21"].ToString(); 
          or1.Parameters.Add("AKMURLZT21", OracleType.NVarChar).Value = dwData["AKMURLZT21"].ToString(); 
          or1.Parameters.Add("AKMFILLER121", OracleType.NVarChar).Value = dwData["AKMFILLER121"].ToString(); 
          or1.Parameters.Add("AKMSYS22", OracleType.NVarChar).Value = dwData["AKMSYS22"].ToString(); 
          or1.Parameters.Add("AKMURLAB22", OracleType.NVarChar).Value = dwData["AKMURLAB22"].ToString(); 
          or1.Parameters.Add("AKMURLZT22", OracleType.NVarChar).Value = dwData["AKMURLZT22"].ToString(); 
          or1.Parameters.Add("AKMFILLER122", OracleType.NVarChar).Value = dwData["AKMFILLER122"].ToString(); 
          or1.Parameters.Add("AKMSYS23", OracleType.NVarChar).Value = dwData["AKMSYS23"].ToString(); 
          or1.Parameters.Add("AKMURLAB23", OracleType.NVarChar).Value = dwData["AKMURLAB23"].ToString(); 
          or1.Parameters.Add("AKMURLZT23", OracleType.NVarChar).Value = dwData["AKMURLZT23"].ToString(); 
          or1.Parameters.Add("AKMFILLER123", OracleType.NVarChar).Value = dwData["AKMFILLER123"].ToString(); 
          or1.Parameters.Add("AKMSYS24", OracleType.NVarChar).Value = dwData["AKMSYS24"].ToString(); 
          or1.Parameters.Add("AKMURLAB24", OracleType.NVarChar).Value = dwData["AKMURLAB24"].ToString(); 
          or1.Parameters.Add("AKMURLZT24", OracleType.NVarChar).Value = dwData["AKMURLZT24"].ToString(); 
          or1.Parameters.Add("AKMFILLER124", OracleType.NVarChar).Value = dwData["AKMFILLER124"].ToString(); 
          or1.Parameters.Add("AKMSYS25", OracleType.NVarChar).Value = dwData["AKMSYS25"].ToString(); 
          or1.Parameters.Add("AKMURLAB25", OracleType.NVarChar).Value = dwData["AKMURLAB25"].ToString(); 
          or1.Parameters.Add("AKMURLZT25", OracleType.NVarChar).Value = dwData["AKMURLZT25"].ToString(); 
          or1.Parameters.Add("AKMFILLER125", OracleType.NVarChar).Value = dwData["AKMFILLER125"].ToString(); 
          or1.Parameters.Add("AKMSYS26", OracleType.NVarChar).Value = dwData["AKMSYS26"].ToString(); 
          or1.Parameters.Add("AKMURLAB26", OracleType.NVarChar).Value = dwData["AKMURLAB26"].ToString(); 
          or1.Parameters.Add("AKMURLZT26", OracleType.NVarChar).Value = dwData["AKMURLZT26"].ToString(); 
          or1.Parameters.Add("AKMFILLER126", OracleType.NVarChar).Value = dwData["AKMFILLER126"].ToString(); 
          or1.Parameters.Add("AKMSYS27", OracleType.NVarChar).Value = dwData["AKMSYS27"].ToString(); 
          or1.Parameters.Add("AKMURLAB27", OracleType.NVarChar).Value = dwData["AKMURLAB27"].ToString(); 
          or1.Parameters.Add("AKMURLZT27", OracleType.NVarChar).Value = dwData["AKMURLZT27"].ToString(); 
          or1.Parameters.Add("AKMFILLER127", OracleType.NVarChar).Value = dwData["AKMFILLER127"].ToString(); 
          or1.Parameters.Add("AKMSYS28", OracleType.NVarChar).Value = dwData["AKMSYS28"].ToString(); 
          or1.Parameters.Add("AKMURLAB28", OracleType.NVarChar).Value = dwData["AKMURLAB28"].ToString(); 
          or1.Parameters.Add("AKMURLZT28", OracleType.NVarChar).Value = dwData["AKMURLZT28"].ToString(); 
          or1.Parameters.Add("AKMFILLER128", OracleType.NVarChar).Value = dwData["AKMFILLER128"].ToString(); 
          or1.Parameters.Add("AKMSYS29", OracleType.NVarChar).Value = dwData["AKMSYS29"].ToString(); 
          or1.Parameters.Add("AKMURLAB29", OracleType.NVarChar).Value = dwData["AKMURLAB29"].ToString(); 
          or1.Parameters.Add("AKMURLZT29", OracleType.NVarChar).Value = dwData["AKMURLZT29"].ToString(); 
          or1.Parameters.Add("AKMFILLER129", OracleType.NVarChar).Value = dwData["AKMFILLER129"].ToString(); 
          or1.Parameters.Add("AKMSYS30", OracleType.NVarChar).Value = dwData["AKMSYS30"].ToString(); 
          or1.Parameters.Add("AKMURLAB30", OracleType.NVarChar).Value = dwData["AKMURLAB30"].ToString(); 
          or1.Parameters.Add("AKMURLZT30", OracleType.NVarChar).Value = dwData["AKMURLZT30"].ToString(); 
          or1.Parameters.Add("AKMFILLER130", OracleType.NVarChar).Value = dwData["AKMFILLER130"].ToString(); 
          or1.Parameters.Add("AKMSYS31", OracleType.NVarChar).Value = dwData["AKMSYS31"].ToString(); 
          or1.Parameters.Add("AKMURLAB31", OracleType.NVarChar).Value = dwData["AKMURLAB31"].ToString(); 
          or1.Parameters.Add("AKMURLZT31", OracleType.NVarChar).Value = dwData["AKMURLZT31"].ToString(); 
          or1.Parameters.Add("AKMFILLER131", OracleType.NVarChar).Value = dwData["AKMFILLER131"].ToString(); 
          or1.Parameters.Add("AKMSYSKEY", OracleType.NVarChar).Value = dwData["AKMSYSKEY"].ToString(); 
          or1.Parameters.Add("AKMFILLER2", OracleType.NVarChar).Value = dwData["AKMFILLER2"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
